'use strict';
//***********************************************
//****** 组件基础配置                      ******
//***********************************************
//------------------------------------------------------------------
import utils from "./utils/vtuzx-util";
import crypto from "./utils/vtuzx-crypto";
import http from "./utils/vtuzx-http";
import api from "./utils/vtuzx-api";

import vtuzxComponents from "./components";

import store from "./store";
//------------------------------------------------------------------
// 基础配置
vtuzxComponents();

// 组件库
const components = [
];

/**
 * 安装方法类和插件
 *
 * @param vue
 */
const install = vue => {
  // 加载方法类
  vue.prototype.$utils = utils;
  vue.prototype.$http = http;
  // // 路由跳转
  vue.prototype.$routeUrl = function(path, query) {
    return this.$router.push({ path, query });
  };

  // 加载组件
  for (let i = 0; i < components.length; i++) {
    let comp = components[i];
    vue.component(comp.name, comp);
  }
};

export default {
  install,
  utils,
  crypto,
  http,
  api,
  store,
  components: {
  }
};
